<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>创新与管理国际学术会议-论文管理系统</title>

<!-- CSS -->
<link href="style/transdmin.css" rel="stylesheet" type="text/css" media="screen" />
<link href="style/submit.css" rel="stylesheet" type="text/css" media="screen" />
<!--[if IE 6]><link rel="stylesheet" type="text/css" media="screen" href="style/ie6.css" /><![endif]-->
<!--[if IE 7]><link rel="stylesheet" type="text/css" media="screen" href="style/ie7.css" /><![endif]-->

<link href="style/uploadify/default.css" rel="stylesheet" type="text/css" />
<link href="style/uploadify/uploadify.css" rel="stylesheet" type="text/css" />
     
<!-- JavaScripts-->
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jNice.js"></script>

<script type="text/javascript" src="js/swfobject.js"></script>
<script type="text/javascript" src="js/jquery.uploadify.v2.1.0.min.js"></script>
<script type="text/javascript" src="js/jquery.json-2.2.min.js"></script>
<script type="text/javascript" src="js/jquery.validate.js"></script>

</head>

<body>
	<div id="wrapper">
    	<!-- h1 tag stays for the logo, you can use the a tag for linking the index page -->
    	<h1><a href="#"><span>创新与管理国际学术会议</span></a></h1>
        
        <!-- You can name the links with lowercase, they will be transformed to uppercase by CSS, we prefered to name them with uppercase to have the same effect with disabled stylesheet -->
        <ul id="mainNav">
        	<li><a href="#" class="active">论文管理</a></li> <!-- Use the "active" class for the active menu item  -->
        	<li><a href="#">缴费管理</a></li>
        	<li><a href="#">我的消息</a></li>
        	<li><a href="#">个人信息</a></li>
        	<li class="logout"><a href="#">退出</a></li>
        </ul>
        <!-- // #end mainNav -->
        
        <div id="containerHolder">
			<div id="container">
        		<div id="sidebar">
                	<ul class="sideNav">
                    	<li><a href="#" class="active">提交论文</a></li>
                    	<li><a href="#">本届论文</a></li>
                    	<li><a href="#">往届论文</a></li>
                    	<li><a href="#">需缴费的论文</a></li>
                    </ul>
                    <!-- // .sideNav -->
                </div>
                <!-- // #sidebar -->
                
                <!-- h2 stays for breadcrumbs -->
                <h2><a href="#">论文管理</a> &raquo; <a href="#" class="active">提交论文 </a></h2>
                
                <div id="main">
                    	<h3>论文上传</h3>
                    	<div style="padding-left:20px;">
                    		<div id="uploadTip">选择您的论文文件进行上传:</div>
	                       	<div id="fileQueue"></div>
							<div id="choosePannel">
								<input type="file" name="file" id="uploadify" />
							</div>
							<div id="fileInfo" style="display:none"></div>
						</div>
<!--						<p>-->
<!--							<a href="javascript:$('#uploadify').uploadifyUpload();">上传</a>| -->
<!--						    <a href="javascript:$('#uploadify').uploadifyClearQueue();">取消上传</a>-->
<!--						</p>-->
                	<form action="addPaper.action" id="submitForm" class="jNice" method="post" onsubmit="$('#submitForm').valid()">
 						<input type="hidden" name="tmpFileName" value="" id="tmpFileName" />
						<h3>论文信息</h3>
                    	<fieldset>
                        	<p><label>中文标题:</label><input type="text" class="text-long" name="chineseTitle" /></p>
                        	<p><label>英文标题:</label><input type="text" class="text-long" name="englishTitle" /></p>
                            <p><label>论文页数:</label><input type="text" class="text-small" name="pageCount" /></p>
                            <p><label>论文主题:</label>
                            <select name="topicId" >
                            	<option value="0" >请选择主题</option>
                            	<option value="1">产学研合作与战略联盟</option>
                            	<option value="2">开放创新与分布式创新</option>
                            	<option value="3">环境创新与可持续发展</option>
                            	<option value="4">产品创新、产业创新与区域创新</option>
                            	<option value="5">组织创新、制度创新与管理创新</option>
                                <option value="6">科技政策、知识产权与知识管理</option>
                                <option value="7">生产运作创新与IT技术应用</option>
                                <option value="8">独立学院（民办大学）的创新与管理</option>
                                <option value="9">综合</option>
                            </select>
                            </p>
                        	<p><label>备注:</label><textarea rows="1" cols="1" name="demo" ></textarea></p>
                        </fieldset>
                        <h3>作者信息</h3>
                        <fieldset>
                        	<p><label>第一作者中文名:</label><input type="text" class="text-long" name="firstAuthor" /></p>
                        	<p><label>第一作者英文名:</label><input type="text" class="text-long" name="firstAuthorEn" /></p>
                            <p><label>第一作者邮箱:</label><input type="text" class="text-long" name="firstEmail" /></p>
                            <p><label>第二作者姓名:</label><input type="text" class="text-long" name="secondAuthor" /></p>
                            <p><label>第三作者姓名:</label><input type="text" class="text-long" name="thirdAuthor" /></p>
                            <input type="submit" value="&nbsp;&nbsp;提&nbsp;&nbsp;交&nbsp;&nbsp;" />
                        </fieldset>
                    </form>
                </div>
                <!-- // #main -->
                
                <div class="clear"></div>
            </div>
            <!-- // #container -->
        </div>	
        <!-- // #containerHolder -->
        
        <p id="footer">powered by 武汉理工大学管理学院</p>
    </div>
    <!-- // #wrapper -->
    
    <script type="text/javascript">
    	var submited = false;   //用户提交操作标志
    	var uploaded = false;   //上传成功标志
    	function delFile(){
			if(uploaded){
				$('#fileInfo').html('');
				$('#fileInfo').hide();
				
				$('#tmpFileName').val('');
				$('#choosePannel').show();
				
				uploaded = false;
			}
    	}
    	
		$(document).ready(function()
	        {
	        	//上传组件
	            $("#uploadify").uploadify({
	                'uploader': 'swf/uploadify.swf',
	                'script': '../util/uploadFile.action',
	                'wmode' : 'transparent',
	                'cancelImg': 'images/cancel.png',
	                'sizeLimit': 3 * 1024 * 1024,
	                'fileExt': '*.doc',
	                'fileDesc': 'word文件(*doc)',
	                'queueID': 'fileQueue',
	                'fileDataName': 'file',    // 对应文件域的name
	                'buttonText': 'Choose Paper',
	                'auto': true,
	                'multi': false,
	                'onComplete': function(event, queueID, fileObj, response, data){
						var result = $.evalJSON(response);
						
						$('#tmpFileName').val(result.tmpFileName);
						$('#choosePannel').hide('fast');
						$('#fileInfo').html('文件: ' + fileObj.name + ' 上传成功！<a href="javascript:delFile();">删除</a>');
						$('#fileInfo').show('slow');
						uploaded = true;

						//如果用户已点了提交 ，则自动提交
						if(submited){
							$('#submitForm').submit();
						}
	                }
	            });

	            //表单验证
	            $('#submitForm').validate({
	                rules: {
	                    chineseTitle: {
	                        maxlength: 50,
	                        required: true
	                    }
	                },
	                messages: {
	                	chineseTitle: {
	                        maxlength: '发送者名字不能超过20个字符',
	                        required: '发送者名字不能为空'
	                    }
	                }
	            });
	        });
	</script>

</body>

</html>
